<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>登录</title>
    {% load static %}
    <link rel="stylesheet" href="{% static 'css/style.css' %}"/>
</head>
<body>
<div class="dowebok">
    <form action="/login/" method="post">{% csrf_token %}
        <div class="logo"></div>
        <div class="form-item">
            <input id="username" name="email" type="text" autocomplete="off" placeholder="邮箱">
            <p class="tip">请输入合法的邮箱地址</p>
        </div>
        <div class="form-item">
            <input id="password" name="pwd" type="password" autocomplete="off" placeholder="登录密码">
            <p class="tip">邮箱或密码不正确</p>
        </div>
        <div class="form-item">
            <button type="submit" id="submit">登 录</button>
        </div>
        <div class="form-item">
            <p style="color: red; text-align: center">{{ error }}</p>
        </div>
    </form>
</div>
<script src="{% static 'js/jquery.min.js' %}"></script>
<script>
    $(function () {
        $('input').val('')
        $('#submit').on('click', function () {
            $('.tip').show()
        })
    })
</script>
</body>
</html>